define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'cont.contract_reviewbg/index',
        add_url: 'cont.contract_reviewbg/add',
        edit_url: 'cont.contract_reviewbg/edit',
        delete_url: 'cont.contract_reviewbg/delete',
        export_url: 'cont.contract_reviewbg/export',
        modify_url: 'cont.contract_reviewbg/modify',
    
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh'
                        ],
                cols: [[
                    {field: 'name', title: '合同变更单编号'},
                    {field: 'field_tJK2l__c', title: '变更日期'},
                    {field: 'field_21C8P__c', title: '注销日期'},
                    {field: 'field_Z1r12__c', title: '合同评审单编号'},
                    {field: 'status',title: '请求状态',selectList: {0:'未请求',1: '请求成功',2: '请求失败'}},
                    {field: 'add_time', title: '添加时间',search: false},
                    {
                        width: 250,
                        title: '操作',
                        templet: ea.table.tool,
                        operat: [
                            [
                                {
                                    text: '查看详情',
                                    url: init.edit_url,
                                    method: 'open',
                                    auth: 'edit',
                                    class: 'layui-btn layui-btn-success layui-btn-xs',
                                    extend: 'data-full="true"',
                                }
                            ]
                        ]
                    }
                ]],
            });
            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        }
    };
    return Controller;
});